﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ControlDePeso.EncryptControlDePesoWebReference;

namespace ControlDePeso.Form
{
    public partial class frmConfirmPassword : Form.frmInicio
    {
        public frmConfirmPassword(string userName)
        {
            InitializeComponent();
            this.UserName = userName;
            this.txtUser.Text = this.UserName;
        }

        private void frmConfirmPassword_Load(object sender, EventArgs e)
        {
            this.chkNewUser.Visible = false;
            this.txtUser.Enabled = false;
        }
        
        public override void btnOK_Click(object sender, EventArgs e)
        {
            EncryptControlDePesoWebReference.EncryptControlDePesoSoapClient encryptControlDePeso = new EncryptControlDePesoSoapClient();

            if (this.txtPassword.Text != String.Empty)
            {
                this.EncryptedPassword = encryptControlDePeso.Encrypt(this.txtPassword.Text);
                this.Close();
            }
        }
    }
}
